﻿namespace Ross.EntityFramework.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class addhistory1 : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.Histories",
                c => new
                    {
                        ID = c.Int(nullable: false, identity: true),
                        Classification = c.String(unicode: false),
                        Department = c.String(unicode: false),
                        TargetName = c.String(unicode: false),
                        TargetDescription = c.String(unicode: false),
                        AssessmentCriteria = c.String(unicode: false),
                        AssessmentMethod = c.String(unicode: false),
                        AccountingMethod = c.String(unicode: false),
                        Statistician = c.String(unicode: false),
                        ResourceSupport = c.String(unicode: false),
                        Responsible = c.String(unicode: false),
                        PlanningDocumentURL = c.String(unicode: false),
                        Lock = c.Boolean(nullable: false),
                        TargetState = c.String(unicode: false),
                        ParentTargetID = c.Int(nullable: false),
                        CreationTime = c.DateTime(nullable: false, precision: 0),
                        StartingTime = c.DateTime(nullable: false, precision: 0),
                        PlannedCompletionTime = c.DateTime(nullable: false, precision: 0),
                        ActualCompletionTime = c.DateTime(nullable: false, precision: 0),
                        ReviseTime = c.DateTime(nullable: false, precision: 0),
                        Approver = c.String(unicode: false),
                        ApprovalStatus = c.String(unicode: false),
                        ApprovalTime = c.DateTime(nullable: false, precision: 0),
                        Version = c.String(unicode: false),
                        Budget1 = c.Single(),
                        CostCategory1 = c.String(unicode: false),
                        Budget2 = c.Single(),
                        CostCategory2 = c.String(unicode: false),
                        Budget3 = c.Single(),
                        CostCategory3 = c.String(unicode: false),
                        Depth = c.Int(nullable: false),
                    })
                .PrimaryKey(t => t.ID);
            
        }
        
        public override void Down()
        {
            DropTable("dbo.Histories");
        }
    }
}
